import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/wareSalesInvoicePick/addOrSave',
    method: 'post',
    data
  })
}
export function list(data) {
  return request({
    url: 'api/wareSalesInvoicePick',
    method: 'get',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/wareSalesInvoicePick/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/wareSalesInvoicePick/addOrSave',
    method: 'post',
    data
  })
}
export function assignPickUser(data) {
  return request({
    url: 'api/wareSalesInvoicePick/assignPickUser',
    method: 'post',
    data
  })
}

export function cancelPick(data) {
  return request({
    url: 'api/wareSalesInvoicePick/cancelPick',
    method: 'post',
    data
  })
}
export function checkEnd(data) {
  return request({
    url: 'api/wareSalesInvoicePick/checkEnd',
    method: 'post',
    data
  })
}

export function copy(data) {
  return request({
    url: 'api/wareSalesInvoicePick/copy',
    method: 'post',
    data
  })
}

export function exportDe(data) {
  return request({
    url: 'api/wareSalesInvoicePick/export',
    method: 'post',
    data
  })
}

export function importDe(data) {
  return request({
    url: 'api/wareSalesInvoicePick/import',
    method: 'post',
    data
  })
}

export function passOrReject(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/passOrReject',
    method: 'post',
    data
  }
  return request(obj)
}

export function detail(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/detail',
    method: 'get',
    data
  }
  return request(obj)
}

export function exportDetail(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/exportDetail',
    method: 'get',
    data
  }
  return request(obj)
}

export function enableOrDisable(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/enableOrDisable',
    method: 'post',
    data
  }
  return request(obj)
}
export function removeDetail(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/removeDetail',
    method: 'post',
    data
  }
  return request(obj)
}

export function childBasCustomerAreaList(data) {
  const obj = {
    url: 'api/dropDown/basCustomerAreaList',
    method: 'get',
    data
  }
  return request(obj)
}

export function basLineList(data) {
  const obj = {
    url: 'api/dropDown/basLineList/all',
    method: 'get',
    data
  }
  return request(obj)
}
export function pickEnd(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/pickEnd',
    method: 'post',
    data
  }
  return request(obj)
}

export function pickStart(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/pickStart',
    method: 'post',
    data
  }
  return request(obj)
}

export function setPickSeq(data) {
  const obj = {
    url: 'api/wareSalesInvoicePick/setPickSeq',
    method: 'post',
    data
  }
  return request(obj)
}
export function info(data) {
  return request({
    url: 'api/wareSalesInvoicePick/info',
    method: 'get',
    data
  })
}
export function checkPrint(data) {
  const obj = {
    url: 'api/wareSalesInvoice/checkPrint',
    method: 'post',
    responseType: 'blob',
    data
  }
  return request(obj)
}
export function pickPrint(data) {
  const obj = {
    url: 'api/wareSalesInvoice/pickPrint',
    method: 'post',
    responseType: 'blob',
    data
  }
  return request(obj)
}

export default { add, edit, copy, exportDe, importDe, del, passOrReject, detail, exportDetail, enableOrDisable, removeDetail, childBasCustomerAreaList, basLineList, assignPickUser, cancelPick, checkEnd, pickStart, setPickSeq, list, pickEnd, info, checkPrint, pickPrint }
